package com.serkol.ams.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.serkol.ams.bean.MyPage;
import com.serkol.ams.entity.UsersWallet;
import com.serkol.ams.entity.UsersWalletIntegralLog;
import com.serkol.ams.entity.UsersWalletLog;
import com.serkol.ams.entity.UsersWalletWithdrawal;
import com.serkol.exception.AuthException;

import java.math.BigDecimal;
import java.util.Map;

/**
* @author pingan
* @description 针对表【users_wallet】的数据库操作Service
* @createDate 2022-09-23 16:09:15
*/
public interface UsersWalletService extends IService<UsersWallet> {

    boolean reChange(Long parentUserId, BigDecimal price,Integer type);
    boolean reChange(Long orderUserId,Long parentUserId, BigDecimal price,Integer type);
    boolean reChange(String msg,Long orderId,Long orderUserId,Long parentUserId, BigDecimal price,Integer type);
    boolean reNoChange(String msg,Long orderId,Long orderUserId,Long parentUserId, BigDecimal price,Integer type)throws AuthException;
    boolean reChange(UsersWalletLog walletLog);
    boolean reNoChange(UsersWalletLog walletLog) throws AuthException;
    boolean reIntegraChange(Long userId, Integer integral);
    boolean reIntegraChange(UsersWalletIntegralLog data);


    UsersWallet getByUserId(Long userId);

    Map<String, Object> getInfo();

    Map<String, Object> getIncomeAndExpenses();


    boolean myWithdrawal(UsersWalletWithdrawal data);

    MyPage<Map<String, Object>> findByPageList(int pageSize, int page, String name, String phone, String parentName, long agentId, String balance);

    Map<String, Object> getInfoLog();

    Map<String, Object> getUsersStastic();


}
